package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author sqj88
 * @date 2017/12/15 17:02
 */
@Entity
@Table(name = "l2r_yh_reservation_detail")
public class L2RYhReservationDetail extends BaseEntity{
    private String groupCode;
    private String hotelCode;
    private String l2RNo;
    private String crsNo;
    private String serialNo;
    private String name;
    private Date arrivalDate;
    private Date departureDate;
    private String status;
    private String hstatus;
    private String roomType;
    private String roomTypeName;
    private BigDecimal roomRate;
    private BigDecimal actualRate;
    private BigDecimal totalAmount;
    private BigDecimal payamount;
    private String cancelReserveRemarks;

    @Basic
    @Column(name = "group_code", nullable = false, length = 20)
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    @Basic
    @Column(name = "hotel_code", nullable = false, length = 20)
    public String getHotelCode() {
        return hotelCode;
    }

    public void setHotelCode(String hotelCode) {
        this.hotelCode = hotelCode;
    }

    @Basic
    @Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "crs_no", nullable = true, length = 32)
    public String getCrsNo() {
        return crsNo;
    }

    public void setCrsNo(String crsNo) {
        this.crsNo = crsNo;
    }

    @Basic
    @Column(name = "serial_no", nullable = true, length = 32)
    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RYhReservationDetail that = (L2RYhReservationDetail) o;

        if (groupCode != null ? !groupCode.equals(that.groupCode) : that.groupCode != null) return false;
        if (hotelCode != null ? !hotelCode.equals(that.hotelCode) : that.hotelCode != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (crsNo != null ? !crsNo.equals(that.crsNo) : that.crsNo != null) return false;
        if (serialNo != null ? !serialNo.equals(that.serialNo) : that.serialNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = groupCode != null ? groupCode.hashCode() : 0;
        result = 31 * result + (hotelCode != null ? hotelCode.hashCode() : 0);
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (crsNo != null ? crsNo.hashCode() : 0);
        result = 31 * result + (serialNo != null ? serialNo.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 32)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "arrival_date", nullable = true)
    public Date getArrivalDate() {
        return arrivalDate;
    }

    public void setArrivalDate(Date arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    @Basic
    @Column(name = "departure_date", nullable = true)
    public Date getDepartureDate() {
        return departureDate;
    }

    public void setDepartureDate(Date departureDate) {
        this.departureDate = departureDate;
    }

    @Basic
    @Column(name = "status", nullable = true, length = 16)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "hstatus", nullable = true, length = 16)
    public String getHstatus() {
        return hstatus;
    }

    public void setHstatus(String hstatus) {
        this.hstatus = hstatus;
    }

    @Basic
    @Column(name = "room_type", nullable = true, length = 32)
    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    @Basic
    @Column(name = "room_type_name", nullable = true, length = 64)
    public String getRoomTypeName() {
        return roomTypeName;
    }

    public void setRoomTypeName(String roomTypeName) {
        this.roomTypeName = roomTypeName;
    }

    @Basic
    @Column(name = "room_rate", nullable = true, precision = 2)
    public BigDecimal getRoomRate() {
        return roomRate;
    }

    public void setRoomRate(BigDecimal roomRate) {
        this.roomRate = roomRate;
    }

    @Basic
    @Column(name = "actual_rate", nullable = true, precision = 2)
    public BigDecimal getActualRate() {
        return actualRate;
    }

    public void setActualRate(BigDecimal actualRate) {
        this.actualRate = actualRate;
    }

    @Basic
    @Column(name = "total_amount", nullable = true, precision = 2)
    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    @Basic
    @Column(name = "payamount", nullable = true, precision = 2)
    public BigDecimal getPayamount() {
        return payamount;
    }

    public void setPayamount(BigDecimal payamount) {
        this.payamount = payamount;
    }

    @Basic
    @Column(name = "cancel_reserve_remarks", nullable = true, length = 64)
    public String getCancelReserveRemarks() {
        return cancelReserveRemarks;
    }

    public void setCancelReserveRemarks(String cancelReserveRemarks) {
        this.cancelReserveRemarks = cancelReserveRemarks;
    }
}
